package tech.aistar.day10;

/**
 * 本类用来演示: 线程的实现方式二
 *
 * @author: success
 * @date: 2022/8/1 9:22 上午
 */
public class RunnableDemo implements Runnable{
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName());
    }
}
class RunnableDemoTest{
    public static void main(String[] args) {
        Runnable r = new RunnableDemo();
        //1. 创建俩个线程
        Thread t1 = new Thread(r);
        Thread t2 = new Thread(r);
        t1.start();
        t2.start();
    }
}